package com.fare.taluo.core.domain.freightprice;

import org.apache.commons.lang3.time.DateUtils;
import org.apache.hadoop.hbase.KeyValue;

/**
 * 航班运营代理人(卖家)价格实体类
 * @author creator: xiangsf
 * @author modifior: xiangsf
 * @since 2012-12-25-下午5:08:01
 * @version v1.0
 */
public class FreightFlightSellerEntity extends FreightFlightNoEntity{
	/**
	 * 代理人(卖家)名称
	 */
	private String seller;
	/**
	 * 代理人（卖家）代码
	 */
	private String sellerCode;

	public String getSeller() {
		return seller;
	}

	public void setSeller(String seller) {
		this.seller = seller;
	}

	public String getSellerCode() {
		return sellerCode;
	}

	public void setSellerCode(String sellerCode) {
		this.sellerCode = sellerCode;
	}

	@Override
	public FreightFlightEntity createEntity(KeyValue kv) throws Exception {
		String family= null,qualifier = null,value = null;
		try{
				super.createEntity(kv);
				 family = new String(kv.getFamily(), "utf-8");
				 qualifier = new String(kv.getQualifier(), "utf-8");
				 value = new String(kv.getValue(), "utf-8");
				if("planeinfo".equalsIgnoreCase(family)){
					if("grabChannel".equalsIgnoreCase(qualifier)){
						this.seller = value;
					}
				}
		}finally{
			 qualifier = null;
			 family = null;
			 value = null;
		}
		return this;
	}
	
	
}
